package dao;

import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class AddPlace {

    public static boolean add(String placeName, String imageUrl) {

        MyConnection myCon = new MyConnection();
        myCon.getConnection();
        boolean st = false;
        int count = -1;
        try {
            PreparedStatement ps = myCon.connection.prepareStatement("insert into place values(null,?,?,0) ");
            ps.setString(1, placeName);
            ps.setString(2, imageUrl);
            ps.executeUpdate();
            ps.close();

        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            myCon.closeConnection();
        }
        return st;
    }
}
